package edu.eurasia;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;

//@WebServlet("/HelloWorldServlet")
public class HelloWorldServlet extends GenericServlet {

	public void service(ServletRequest request, ServletResponse response)
			throws ServletException, IOException {
		  // 用一个对象设置相应首部
		response.setContentType("text/html");
		// 得到输出流PrinterWriter对象,Servlet使用输出流来产生响应
		PrintWriter out = response.getWriter();
		// 使用输出流对象向客户端发送字符数据
		out.println("<html>");
		out.println("<head><title>Hello World</title></head>");
		out.println("<body>");
		out.println("<big>Hello World</big>");
		out.println("</body></html>");
	}
}